home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 6_2.lha / 6_2 / tst2.c < prev   
C/C++ Source or Header  |  1993-08-08  |  305b  |  13 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. riend string& operator() (string& s1, int base, int len)
  6.  
  7.    char *s = new char[len];
  8.    strcpy(s, &s1.p->s[base]);
  9.    string st = s;
  10.    delete s;
  11.    return st;
  12.  
  13.